module.exports = (app) => {
  const { Schema, model, getModelName, pre } = app.jax.mongoose
  const modelName = getModelName(__filename)

  const modelSchema = new Schema({
    name: String, // 数据名称
    value: String, // 数据值
    dictId: Schema.Types.ObjectId, // 字典ID
    type: String, // 字典类型/标识
    rank: { type: Number, default: 0 }, // 序号
    isConst: Boolean, // 是常量
  })

  const Model = model(modelName, modelSchema)

  return Model
}
